﻿<UserControl x:Class="WpfImageDuplicates.BasicImageInfoView"
             xmlns:y="clr-namespace:WpfImageDuplicates"  
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:wpf="clr-namespace:BrainTechLLC.WPF;assembly=BrainTechLLC.WPF"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <UserControl.Resources>
        <wpf:VisibilityConverter x:Key="VisibilityConverter" />
    </UserControl.Resources>
    <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="54"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock FontSize="9" Grid.Column="0" Text="File Name:"/>
            <TextBlock FontSize="9"  Grid.Column="1" Text="{Binding FileNameOnly}"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="54"/>
                <ColumnDefinition Width="0.5*"/>
                <ColumnDefinition Width="54"/>
                <ColumnDefinition Width="0.5*"/>
            </Grid.ColumnDefinitions>
            <TextBlock FontSize="9" Grid.Column="0" Text="Width:"/>
            <TextBlock FontSize="9" Grid.Column="1" Text="{Binding LastOriginalBitmapWidth}"/>
            <TextBlock FontSize="9" Grid.Column="2" Text="Height:"/>
            <TextBlock FontSize="9" Grid.Column="3" Text="{Binding LastOriginalBitmapHeight}"/>
        </Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="54"/>
                <ColumnDefinition Width="0.5*"/>
                <ColumnDefinition Width="54"/>
                <ColumnDefinition Width="0.5*"/>
            </Grid.ColumnDefinitions>
            <TextBlock FontSize="9" Grid.Column="0" Text="Size:"/>
            <TextBlock FontSize="9" Grid.Column="1" Text="{Binding FileSize}"/>
            <TextBlock FontSize="9" Grid.Column="2" Text="Blur:"/>
            <TextBlock FontSize="9" Grid.Column="3" Text="{Binding Path=Blur, StringFormat=N0}"/>
        </Grid>
        <!--Path=IsSimilarityBarVisible-->
        <Grid x:Name="gridSimilarityBar" Visibility="{Binding Mode=OneWay, Path=ShowSimilarityBar, Converter={StaticResource VisibilityConverter}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <y:ViewSimilarities HorizontalAlignment="Stretch" x:Name="viewSimilarities" FileImageViewModel="{Binding}"/>
        </Grid>
        <Grid x:Name="simGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="74"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="12"/>
            </Grid.ColumnDefinitions>
            <TextBlock FontSize="9" Grid.Column="0" Text="Sim Groups:"/>
            <TextBlock FontSize="9"  Grid.Column="1" Text="{Binding SimilarityGroupStrings}"/>
            <ToggleButton Grid.Column="2" FontSize="9" Content="S" IsChecked="{Binding Mode=TwoWay, Path=ShowSimilarityBar}"/>
        </Grid>
    </StackPanel>
</UserControl>
